Author Topic: Can't compile my app anymore  (Read 5891 times)

fusion

  • Guest
Can't compile my app anymore
« on: December 21, 2006, 08:08:41 pm »
Hi,

I have made a dll project in windows using mingw wich worked perfectly till now.
I don't know what I did or didn't do but I have a problem now. My dll project compiles fine but it doesn't seem
to generate the right information in the library files and in the export definition file.
There are alot of class methods missing. It worked very well till sometime yesterday.
In which menus should I look to repair my project?

Thanks,
fusion

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2780
Re: Can't compile my app anymore
« Reply #1 on: December 21, 2006, 08:24:53 pm »
   //-- Please Provide more information
   Would you state your CodeBlocks version and compiler version and your Operating System.

Would you turn on compiler logging and paste the results in a msg.

   //-- Full Compile Logging --
   Main Menu->Settings->Compiler and Debugger->"Other"->Compiler logging = "Full command line".

fusion

  • Guest
Re: Can't compile my app anymore
« Reply #2 on: December 21, 2006, 10:11:13 pm »
Ah, sorry I always forget to post the essentials :(. I'm using MingW, the version is the one linked in the setup tutorial on the wiki.

Here's the compiler output:

Quote
-------------- Build: Debug in SlickyEngine ---------------
mingw32-g++.exe -Wall  -Iinclude -IDependencies\physfs\include -IDependencies\Angelscript\include -Iinclude  -c src\Matrix4.cpp -o obj\Debug\src\Matrix4.o
mingw32-g++.exe -Wall  -Iinclude -IDependencies\physfs\include -IDependencies\Angelscript\include -Iinclude  -c src\Root.cpp -o obj\Debug\src\Root.o
mingw32-g++.exe -Wall  -Iinclude -IDependencies\physfs\include -IDependencies\Angelscript\include -Iinclude  -c src\ScriptManager.cpp -o obj\Debug\src\ScriptManager.o
mingw32-g++.exe -Wall  -Iinclude -IDependencies\physfs\include -IDependencies\Angelscript\include -Iinclude  -c src\Vector4.cpp -o obj\Debug\src\Vector4.o
mingw32-g++.exe -Wall  -Iinclude -IDependencies\physfs\include -IDependencies\Angelscript\include -Iinclude  -c src\FileSystem.cpp -o obj\Debug\src\FileSystem.o
mingw32-g++.exe -shared -Wl,--output-def=lib\Debug\libSlickyEngine_d.def -Wl,--out-implib=lib\Debug\libSlickyEngine_d.a -Wl,--dll -L"C:\Dokumente und Einstellungen\stefan\Desktop\cb\MinGW\lib"  obj\Debug\src\Matrix4.o obj\Debug\src\Root.o obj\Debug\src\ScriptManager.o obj\Debug\src\Vector4.o obj\Debug\src\FileSystem.o   -o lib\Debug\SlickyEngine_d.dll  Dependencies\physfs\physfs_static_debug\libphysfs_static.a Dependencies\Angelscript\lib\libangelscriptd.a
Creating library file: lib\Debug\libSlickyEngine_d.a

-------------- Build: Debug in SlickyTest ---------------
mingw32-g++.exe -Wall -g  -I..\SlickyEngine\Dependencies\physfs\include -I..\SlickyEngine\Dependencies\Angelscript\include -I..\SlickyEngine\include  -c main.cpp -o obj\Debug\main.o
mingw32-g++.exe -L"C:\Dokumente und Einstellungen\stefan\Desktop\cb\MinGW\lib"  -o .\SlickyTest.exe obj\Debug\main.o    ..\SlickyEngine\lib\Debug\libSlickyEngine_d.a ..\SlickyEngine\lib\Debug\libSlickyEngine_d.a
obj\Debug\main.o: In function `main':
D:/SlickyTest/main.cpp:12: undefined reference to `FileSystem::GetSingleton()'
D:/SlickyTest/main.cpp:13: undefined reference to `FileSystem::Init(char**)'
D:/SlickyTest/main.cpp:15: undefined reference to `FileSystem::GetBaseDir()'
D:/SlickyTest/main.cpp:16: undefined reference to `FileSystem::AddSearchPath(std::string, int)'
D:/SlickyTest/main.cpp:17: undefined reference to `FileSystem::AddSearchPath(std::string, int)'
D:/SlickyTest/main.cpp:18: undefined reference to `FileSystem::AddSearchPath(std::string, int)'
D:/SlickyTest/main.cpp:19: undefined reference to `FileSystem::GetSearchPath()'
D:/SlickyTest/main.cpp:20: undefined reference to `FileSystem::Exists(std::string)'
D:/SlickyTest/main.cpp:21: undefined reference to `FileSystem::OpenReadTextFile(std::string)'
D:/SlickyTest/main.cpp:23: undefined reference to `FileSystem::DeInit()'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 10 seconds)
10 errors, 0 warnings
 

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2780
Re: Can't compile my app anymore
« Reply #3 on: December 21, 2006, 11:11:27 pm »
Code
..\SlickyEngine\lib\Debug\libSlickyEngine_d.a ..\SlickyEngine\lib\Debug\libSlickyEngine_d.a 

looks to me like you included the import lib twice. What about the .def?

fusion

  • Guest
Re: Can't compile my app anymore
« Reply #4 on: December 22, 2006, 07:10:26 pm »
Yep I linked to it twice, but this was not the problem.

EXPORTS
    asCreateScriptEngine @1
    asGetActiveContext @2
    asGetLibraryOptions @3
    asGetLibraryVersion @4
    asThreadCleanup @5

Thats all whats in the def file. There should be alot more.

fusion

  • Guest
Re: Can't compile my app anymore
« Reply #5 on: December 22, 2006, 07:50:11 pm »
Hmm strange...

   // Create the script engine
   mEngine = asCreateScriptEngine(ANGELSCRIPT_VERSION);
   if( mEngine == 0 )
   {
      std::cout << "Failed to create script engine." << std::endl;
      return -1;
   }

When I comment out this code everything works and links fine. My def file has alot more entries then.
I never had such a problem before.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7594
    • My Best Post
Re: Can't compile my app anymore
« Reply #6 on: December 22, 2006, 08:20:58 pm »
Hmm strange...

   // Create the script engine
   mEngine = asCreateScriptEngine(ANGELSCRIPT_VERSION);
   if( mEngine == 0 )
   {
      std::cout << "Failed to create script engine." << std::endl;
      return -1;
   }

When I comment out this code everything works and links fine. My def file has alot more entries then.
I never had such a problem before.

I do NOT think ANGELSCRIPT is used in the nightly builds.

Tim S
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

fusion

  • Guest
Re: Can't compile my app anymore
« Reply #7 on: December 22, 2006, 10:09:20 pm »
Hmm if I understand you correctly, I can't use Angelscript in my projects with codeblocks?
I'm using angelscript in my own project wich has nothing todo with codeblock ( its just my ide ).

sethjackson

  • Guest
Re: Can't compile my app anymore
« Reply #8 on: December 22, 2006, 10:15:04 pm »
You can use AngelScript with C::B....

fusion

  • Guest
Re: Can't compile my app anymore
« Reply #9 on: December 23, 2006, 09:40:58 am »
I think i didn't express myself right. stahta01 I'm not trying to compile codeblocks, I'm trying to compile my own project wich uses angelscript. It sounds to me like you are thinking I'm trying to use angelscript to compile codeblocks.