Using DLL in another DLL

Viewed 39

So I created a DLL(dll1) in visual studio 2022, which uses another DLL(dll2). But whenever I try to use dll2's functions with including dll1, the executable just stops at that point

for example:

dll2 has a function named dll2func1() and dll2func2()

dll1 includes dll2 and has a function like this:

    dll1func1(){
        cout << "started" << endl;
        dll2func1();
        cout << "dll2func1 used" << endl;
        dllfunc2();
        cout << "dll2func2 used, end of function" << endl;
        }

when I use dll1func1() in my program, it only prints "started" and continuing while outputting nothing else.

How can I solve this?

1 Answers

So I already linked the include directory and DLL2 location, also DLL2.dll to Additional Dependencies to DLL1. It turned out there was no problem there, it was with the project I tried to run.

Basically I properly linked include directories, dll locations and updated additional dependencies of the project with DLL1 and DLL2.

No problem there about linking a dll to a dll, actually sorry for that.

Related