Crystal Space
Welcome, Guest. Please login or register.
October 30, 2014, 03:31:12 pm

Login with username, password and session length
Search:     Advanced search
9011 Posts in 2044 Topics by 8882 Members
Latest Member: Susiesmith5
* Home Help Search Login Register
+  Crystal Space
|-+  Crystal Space Development
| |-+  Support
| | |-+  [SOLVED] NetBeans + MinGW + CS `_imp__GetStockObject@4'
« previous next »
Pages: [1] Print
Author Topic: [SOLVED] NetBeans + MinGW + CS `_imp__GetStockObject@4'  (Read 5516 times)
NinjaMonkey
Newbie
*
Posts: 2


View Profile Email
« on: November 11, 2010, 04:58:56 pm »

Hello. Since couple weeks I'm trying to learn how to make games. After couple games written in 2D I decided to take another step and try to write something in 3D. In google I've found crystal space. I'm windows user so it took me some time to figure out how to make it work. Firstly I did everything according to this tutorial:
http://www.crystalspace3d.org/docs/online/1.4/manual/MinGW.html#0
Building CS took me couple hours.

Than I've made new project in NetBeans 6.9.1. In project properties I've added:
in C++ compiler options- Include:../../../../../CS/include
In Linker options: Additionaly libraries: ../../../../../CS/out/msysx86/optimize/libs

Than I've added 2 files from CS\apps\tutorial\simple1 folder to my project and hit Build. Unfortunately code didn't want to build:
Code:
"/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory `/d/[DropBox]/My Dropbox/[PROJEKTY]/[Pisanie gier]/[PrawieGry] CrystalSpace3D'
"/bin/make"  -f nbproject/Makefile-Debug.mk dist/Debug/MinGW-Windows/_prawiegry__crystalspace3d.exe
make[2]: Entering directory `/d/[DropBox]/My Dropbox/[PROJEKTY]/[Pisanie gier]/[PrawieGry] CrystalSpace3D'
mkdir -p dist/Debug/MinGW-Windows
g++.exe     -o dist/Debug/MinGW-Windows/_prawiegry__crystalspace3d build/Debug/MinGW-Windows/simple1.o -L../../../../../CS/out/msysx86/optimize/libs -lcrystalspace-1.4
Info: resolving vtable for std::exception by linking to __imp___ZTVSt9exception (auto-import)
Info: resolving vtable for std::bad_alloc by linking to __imp___ZTVSt9bad_alloc (auto-import)
Info: resolving vtable for __cxxabiv1::__vmi_class_type_info by linking to __imp___ZTVN10__cxxabiv121__vmi_class_type_infoE (auto-import)
Info: resolving vtable for __cxxabiv1::__class_type_info by linking to __imp___ZTVN10__cxxabiv117__class_type_infoE (auto-import)
Info: resolving vtable for __cxxabiv1::__si_class_type_info by linking to __imp___ZTVN10__cxxabiv120__si_class_type_infoE (auto-import)
c:/mingw/bin/../lib/gcc/mingw32/4.5.0/../../../../mingw32/bin/ld.exe: warning: auto-importing has been activated without --enable-auto-import specified on the command line.
This should work unless it involves constant data structures referencing symbols from auto-imported DLLs.
../../../../../CS/out/msysx86/optimize/libs/libcrystalspace-1.4.a(win32.o): In function `Win32Assistant':
d:/CS/libs/csutil/win32/win32.cpp:471: undefined reference to `_imp__GetStockObject@4'
d:/CS/libs/csutil/win32/win32.cpp:471Info: resolving std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_S_empty_rep_storage by linking to __imp___ZNSs4_Rep20_S_empty_rep_storageE (auto-import)
make[2]: Leaving directory `/d/[DropBox]/My Dropbox/[PROJEKTY]/[Pisanie gier]/[PrawieGry] CrystalSpace3D'
make[1]: Leaving directory `/d/[DropBox]/My Dropbox/[PROJEKTY]/[Pisanie gier]/[PrawieGry] CrystalSpace3D'
: undefined reference to `_imp__GetStockObject@4'
collect2: ld returned 1 exit status
make[2]: *** [dist/Debug/MinGW-Windows/_prawiegry__crystalspace3d.exe] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2

BUILD FAILED (exit value 2, total time: 5s)

I've found couple similar topics in this section but none of them helped me.

EDIT: I forgot to mention what CS/CEL and WinLibs I'm using:
cs-win32libs-1.9_006 (from tutorial)
CS 1.4 (from SVN repository)
CEL 1.4 (from SVN repository)

System: Windows 7 (x86)
Graphic card: NVIDIA GeForce G 105M
Driver: NVidia 275.21 (i guess)
« Last Edit: November 13, 2010, 04:13:09 am by NinjaMonkey » Logged
Wysardry
Newbie
*
Posts: 17


View Profile
« Reply #1 on: November 12, 2010, 05:47:57 am »

I don't have a clue how to set up NetBeans for Crystal Space (I use Visual Studio 2008 Express), but I do know you're trying to use the wrong version of the Windows libraries.

cs-win32libs-1.9_006 is for CS 1.9 only, you need cs-win32libs-1.4_002 for CS 1.4.

If you aren't already doing so, I would suggest using the branch/release rather than tag versions of CS and CEL 1.4 as the code has been updated more recently.

https://crystal.svn.sourceforge.net/svnroot/crystal/CS/branches/release/V1.4
https://cel.svn.sourceforge.net/svnroot/cel/cel/branches/release/V1.4
Logged
NinjaMonkey
Newbie
*
Posts: 2


View Profile Email
« Reply #2 on: November 12, 2010, 07:32:10 pm »

Today I've deleted both CS/CEL folders and win32libs 1.9. Than I've installed win32libs 1.4 and new CS/CEL files from:
https://crystal.svn.sourceforge.net/svnroot/crystal/CS/branches/release/V1.4
https://cel.svn.sourceforge.net/svnroot/cel/cel/branches/release/V1.4

I've build them again: ./configuration than jam in MSYS. Unfortunately it appears that it didn't help. I still have same problem with building my simple1 project in NetBeans:
Code:
"/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory `/d/[DropBox]/My Dropbox/[PROJEKTY]/[Pisanie gier]/[PrawieGry] CrystalSpace3D'
"/bin/make"  -f nbproject/Makefile-Debug.mk dist/Debug/MinGW-Windows/_prawiegry__crystalspace3d.exe
make[2]: Entering directory `/d/[DropBox]/My Dropbox/[PROJEKTY]/[Pisanie gier]/[PrawieGry] CrystalSpace3D'
mkdir -p dist/Debug/MinGW-Windows
g++.exe     -o dist/Debug/MinGW-Windows/_prawiegry__crystalspace3d build/Debug/MinGW-Windows/simple1.o -L../../../../../CS/out/msysx86/optimize/libs -lcrystalspace-1.4
Info: resolving vtable for std::exception by linking to __imp___ZTVSt9exception (auto-import)
Info: resolving vtable for std::bad_alloc by linking to __imp___ZTVSt9bad_alloc (auto-import)
Info: resolving vtable for __cxxabiv1::__vmi_class_type_info by linking to __imp___ZTVN10__cxxabiv121__vmi_class_type_infoE (auto-import)
Info: resolving vtable for __cxxabiv1::__class_type_info by linking to __imp___ZTVN10__cxxabiv117__class_type_infoE (auto-import)
Info: resolving vtable for __cxxabiv1::__si_class_type_info by linking to __imp___ZTVN10__cxxabiv120__si_class_type_infoE (auto-import)
c:/mingw/bin/../lib/gcc/mingw32/4.5.0/../../../../mingw32/bin/ld.exe: warning: auto-importing has been activated without --enable-auto-import specified on the command line.
This should work unless it involves constant data structures referencing symbols from auto-imported DLLs.
../../../../../CS/out/msysx86/optimize/libs/libcrystalspace-1.4.a(win32.o): In function `Win32Assistant':
d:/CS/libs/csutil/win32/win32.cpp:471: undefined reference to `_imp__GetStockObject@4'
d:/CS/libs/csutil/win32/win32.cpp:471Info: resolving std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_S_empty_rep_storage by linking to __imp___ZNSs4_Rep20_S_empty_rep_storageE (auto-import)
: undefined reference to `_imp__GetStockObject@4'
collect2: ld returned 1 exit status
make[2]: *** [dist/Debug/MinGW-Windows/_prawiegry__crystalspace3d.exe] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
make[2]: Leaving directory `/d/[DropBox]/My Dropbox/[PROJEKTY]/[Pisanie gier]/[PrawieGry] CrystalSpace3D'
make[1]: Leaving directory `/d/[DropBox]/My Dropbox/[PROJEKTY]/[Pisanie gier]/[PrawieGry] CrystalSpace3D'

BUILD FAILED (exit value 2, total time: 4s)

I have no idea what I might be doing wrong.


EDIT:
I found solution! Cheesy Today while I was googling for answer I've found this forum:
Code:
http://www.winapi.org/forum/viewtopic.php?p=4121
Someone had similar problem with WinAPI. I just had to add: "-mwindows" in additional C++ Compiler options.
« Last Edit: November 13, 2010, 04:12:41 am by NinjaMonkey » Logged
Alton
Newbie
*
Posts: 1

sfsdf 4r4werw34
View Profile WWW Email
« Reply #3 on: June 29, 2013, 01:41:51 pm »

i would like to appreciate you for sharing such a great info with us
Logged

alton
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 7.252 seconds with 15 queries.