Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / error LNK2001: "struct GlobStruct * Core"

Author
Message
SirFire
19
Years of Service
User Offline
Joined: 4th Apr 2005
Location: North America
Posted: 4th Nov 2005 08:26 Edited at: 4th Nov 2005 09:28
I'm attempting to make my first dll for dbp with visual c++, and I can't seem to get rid of this error (i'm ignoring the warnings):



I've searched every .lib file on the computer for the string globstruct, but can't find anything. Can't find anything on google.
help?

OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 4th Nov 2005 12:40
Are you including #include "globstruct.h" ?

Come to the third DarkBasic Pro Sci Fi Con - 8 days to go! Moomoo !
Blog:http://spaces.msn.com/members/BouncyBrick/
Web Site:http://www.nicholaskingsley.co.uk
SirFire
19
Years of Service
User Offline
Joined: 4th Apr 2005
Location: North America
Posted: 4th Nov 2005 15:43
aye


OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 4th Nov 2005 16:55
And in the C File - usually headers in the project layout are ignored.

Come to the third DarkBasic Pro Sci Fi Con - 8 days to go! Moomoo !
Blog:http://spaces.msn.com/members/BouncyBrick/
Web Site:http://www.nicholaskingsley.co.uk
OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 4th Nov 2005 16:56
And in the C File - usually headers in the project layout are ignored.

And do you have a struct globStruct *g_pGlobStruct (or something like it in your program) ?

Come to the third DarkBasic Pro Sci Fi Con - 8 days to go! Moomoo !
Blog:http://spaces.msn.com/members/BouncyBrick/
Web Site:http://www.nicholaskingsley.co.uk
SirFire
19
Years of Service
User Offline
Joined: 4th Apr 2005
Location: North America
Posted: 4th Nov 2005 17:16
I did not, found that in the framework.cpp file, after I included that file, that error disappeared, but then I got a few more errors which I dispensed quickly, now compiling ok.

Cheers!

OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 4th Nov 2005 22:42
Thats okay!

Come to the third DarkBasic Pro Sci Fi Con - 8 days to go! Moomoo !
Blog:http://spaces.msn.com/members/BouncyBrick/
Web Site:http://www.nicholaskingsley.co.uk
SirFire
19
Years of Service
User Offline
Joined: 4th Apr 2005
Location: North America
Posted: 8th Nov 2005 04:10
I was making good progress, till I got to my last function which is supposed to return a string. This is really really frustrating, why does string returning have to be so difficult?

Anyway, I'm getting the same error again.

Same error:
testcom.obj : error LNK2001: unresolved external symbol "struct GlobStruct * Core" (?Core@@3PAUGlobStruct@@A)

OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 8th Nov 2005 09:11
Define a Globstruct called Core...

Come to the third DarkBasic Pro Sci Fi Con - 5 days to go! Cooo !
Blog:http://spaces.msn.com/members/BouncyBrick/
Web Site:http://www.nicholaskingsley.co.uk
SirFire
19
Years of Service
User Offline
Joined: 4th Apr 2005
Location: North America
Posted: 8th Nov 2005 09:35
Thanks, working now

SirFire
19
Years of Service
User Offline
Joined: 4th Apr 2005
Location: North America
Posted: 8th Nov 2005 10:56 Edited at: 8th Nov 2005 10:56
Ok, even though the dll is compiling fine now, when I call the function DS_Recieve from my dbp app, the app crashes silently, and leaves a crash log saying the problem is on line 7, which is the line where I put the DS_Recieve call.
Maybe someone (probably SSS ) can shed some light on this.
Here is the c++ code:

My string table entry is:

And my dbp code is:

And the crashlog:


OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 8th Nov 2005 11:29
Has Core been defined, ie not a NULL pointer ?

Come to the third DarkBasic Pro Sci Fi Con - 5 days to go! Cooo !
Blog:http://spaces.msn.com/members/BouncyBrick/
Web Site:http://www.nicholaskingsley.co.uk
SirFire
19
Years of Service
User Offline
Joined: 4th Apr 2005
Location: North America
Posted: 8th Nov 2005 12:11
Right as always Sarcasm Stealth Squad, Core was supposed to be g_pGlob anyway, so I got rid of Core, replaced references to it with g_pGlob and then I realized I had not set the recievecoredataptr to be a dll export. Once all that was done, I successfully called all my functions and my strings were returned back to dbp without any crashes.

You are The Man!

OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 8th Nov 2005 13:13
I know - but I do try to be modest.

Come to the third DarkBasic Pro Sci Fi Con - 4 days to go! Flooooo !
Blog:http://spaces.msn.com/members/BouncyBrick/
Web Site:http://www.nicholaskingsley.co.uk

Login to post a reply

Server time is: 2024-11-21 20:04:56
Your offset time is: 2024-11-21 20:04:56