Crystal Space
Welcome, Guest. Please login or register.
July 31, 2014, 12:54:27 am

Login with username, password and session length
Search:     Advanced search
9005 Posts in 2043 Topics by 8260 Members
Latest Member: Lovelymae39
* Home Help Search Login Register
+  Crystal Space
|-+  Crystal Space Development
| |-+  Support
| | |-+  LINK error in VC for the csThread
« previous next »
Pages: [1] Print
Author Topic: LINK error in VC for the csThread  (Read 3320 times)
arcus
Newbie
*
Posts: 4


View Profile Email
« on: August 01, 2005, 08:38:43 am »

hi, all
I'm using CS to make my application. And I met this link error like this,
libcrystalspace_d.lib(wintools.obj) : error LNK2001: Unresolved External Symbol "void (__cdecl* csStaticVarCleanup)(void (__cdecl*)(void))" (?csStaticVarCleanup@@3P6AXP6AXXZ@ZA)
And I find that it is this line cause this error:
thread=csThread::Create(this);
I have include the "libcrystalspace_d.lib" in the lib, and I'm using the win32 lib is 0.99r0_013.
Does anyone met this problem before?

Any help and suggestion will be welcome!
Frank
Logged
mark
Full Member
***
Posts: 101


View Profile
« Reply #1 on: August 12, 2005, 05:11:49 pm »

I have similar problems with windows+mingw when I want to compile my cs-application:

Quote
...
include/crystalspace/csutil/scfstr.h: undefined reference to `csStaticVarCleanup'
...
out\lib/libcrystalspace.a(cfgfile.o)(.text+0x656):cfgfile.cpp: undefined reference to `csStaticVarCleanup'
out\lib/libcrystalspace.a(cfgfile.o)(.text+0xb50):cfgfile.cpp: undefined reference to `csStaticVarCleanup'
out\lib/libcrystalspace.a(xmltiny.o)(.text+0xb6):xmltiny.cpp: undefined reference to `csStaticVarCleanup'
out\lib/libcrystalspace.a(xmltiny.o)(.text+0x246):xmltiny.cpp: undefined reference to `csStaticVarCleanup'
out\lib/libcrystalspace.a(xmltiny.o)(.text+0x336):xmltiny.cpp: undefined reference to `csStaticVarCleanup'
out\lib/libcrystalspace.a(xmltiny.o)(.text+0x526):xmltiny.cpp: more undefined references to `csStaticVarCleanup' follow
collect2: ld returned 1 exit status
Logged

Gentoo Linux ~x86, kernel 2.6.11-cko9 smp, gcc 3.4.4-r1, binutils 2.16.1, glibc 2.3.5 NPTL
CS+CEL Pseudo Stable 2005.09.03
Administrator
Jr. Member
*****
Posts: 51


View Profile Email
« Reply #2 on: August 13, 2005, 03:05:45 pm »

This is because you did not read the documentation correctly Wink

Every application which use CS needs to have CS_IMPLEMENT_APPLICATION in one of the sourcefiles (.cpp).

-M
Logged
mark
Full Member
***
Posts: 101


View Profile
« Reply #3 on: August 13, 2005, 04:45:28 pm »

My code should be ok, because
a) my project has three executables. I use CS_IMPLEMENT_APPLICATION only once in each cpp-file with a main() function.
b) it compiles and runs on linux

This error only happens with windows
Logged

Gentoo Linux ~x86, kernel 2.6.11-cko9 smp, gcc 3.4.4-r1, binutils 2.16.1, glibc 2.3.5 NPTL
CS+CEL Pseudo Stable 2005.09.03
mark
Full Member
***
Posts: 101


View Profile
« Reply #4 on: August 13, 2005, 05:31:41 pm »

oh damn, for windows this has to be set in libraries too...
Logged

Gentoo Linux ~x86, kernel 2.6.11-cko9 smp, gcc 3.4.4-r1, binutils 2.16.1, glibc 2.3.5 NPTL
CS+CEL Pseudo Stable 2005.09.03
Administrator
Jr. Member
*****
Posts: 51


View Profile Email
« Reply #5 on: August 13, 2005, 06:05:19 pm »

Accualy, for libraries there is a different macro, CS_IMPLEMENT_FOREIGN_DLL ..

-M
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 4.47 seconds with 15 queries.