语言

Menu
Sites
Language
Converting badaOS 2.0 game to Tizen 2.0 game

I'm a badaOS developer and tried to import a native c++ game of mine from badaOS 2.0 to the new TizenOS 2.0 following the migration guide. After all modifications in my source code I get errors that aren't in my header and/or source files:

I get 4 warnings and 2 errors generated.

 

C:/tizen-sdk/platforms/tizen2.0/rootstraps/tizen-emulator-2.0.cpp/usr/include\unistd.h:1056:20: error: use of undeclared identifier 'intptr_t'
extern void *sbrk (intptr_t __delta) __THROW;
                   ^
C:/tizen-sdk/platforms/tizen2.0/rootstraps/tizen-emulator-2.0.cpp/usr/include\unistd.h:1056:37: error: expected ';' after top level declarator
extern void *sbrk (intptr_t __delta) __THROW;
 
GamesGUI/src/subdir.mk:301: recipe for target 'GamesGUI/src/OGUT.o' failed
mingw32-make.exe: *** [GamesGUI/src/OGUT.o] Error 1
 
in the subdir.mk file @ line 301
 
GamesGUI/src/OGUT.o: C:/Tizen-workspace/FrameWork/GamesGUI/src/OGUT.cpp
@echo 'Building file: $<'
@echo 'Invoking: C++ Compiler'
clang++.exe -I"pch" -D_DEBUG -I"C:\Tizen-workspace\Arithmetics\inc" -I"C:/tizen-sdk/platforms/tizen2.0/rootstraps/tizen-emulator-2.0.cpp/usr/include" -I"C:/tizen-sdk/platforms/tizen2.0/rootstraps/tizen-emulator-2.0.cpp/usr/include/libxml2" -I"C:\tizen-sdk\library" -I"C:/tizen-sdk/platforms/tizen2.0/rootstraps/tizen-emulator-2.0.cpp/usr/include/osp" -I"C:\Tizen-workspace\FrameWork\_Include" -I"C:\Tizen-workspace\FrameWork\GamesGUI\inc" -I"C:\Tizen-workspace\FrameWork\GameLogic" -I"C:\Tizen-workspace\FrameWork\AdvanceUtils" -I"C:\Tizen-workspace\FrameWork\BaseUtils" -I"C:\Tizen-workspace\FrameWork\CmdHandling" -I"C:\Tizen-workspace\FrameWork\Hardware" -I"C:\Tizen-workspace\FrameWork\Security" -O0 -g3 -Wall -c -fmessage-length=0 -target i386-tizen-linux-gnueabi -gcc-toolchain C:/tizen-sdk/tools/smart-build-interface/../i386-linux-gnueabi-gcc-4.5/ -ccc-gcc-name i386-linux-gnueabi-g++ -march=i386 -Wno-gnu -fPIE --sysroot="C:/tizen-sdk/platforms/tizen2.0/rootstraps/tizen-emulator-2.0.cpp" -I"C:/tizen-sdk/platforms/tizen2.0/rootstraps/tizen-emulator-2.0.cpp/usr/include" -I"C:/tizen-sdk/platforms/tizen2.0/rootstraps/tizen-emulator-2.0.cpp/usr/include/libxml2" -I"C:\tizen-sdk\library" -I"C:/tizen-sdk/platforms/tizen2.0/rootstraps/tizen-emulator-2.0.cpp/usr/include/osp" -D_APP_LOG -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
@echo 'Finished building: $<'
@echo ' '
 

Any help?

编辑者为: Brock Boland 17 3月, 2014 原因: Paragraph tags added automatically from tizen_format_fix module.

响应

6 回复
rb s
You are getting undeclared identifier 'intptr_t' error this means you have not declared 'intptr_t'. If any data types used without declaration you will get such error. From other error it says that you are missing ;( semicolon) so please check it.
dhirku
It seems there is something wrong with unistd.h header file ....... Check if it got modified accidently ....... or when you updated new SDK it wasn't replaced properly. What I did for checking this issue was to comment out line number 268 in unistd.h (i.e. "//typedef __intptr_t intptr_t;") and got the exact same error as yours ... just check that.
dhirku
By any chance are you calling "sbrk()" ..... you see these are low level calls internaly used by malloc. In case you using be carefull with the order of including files .... may be something went in wrong order
Arcin Bozkurt
I am getting the same error.... to quickly the cover the reponses in the thread : - the SDK file unistd.h is NOT dirty. It is the original file. - I should simply be able to include and it should be enough. Order of any other include files should not matter. BTW I am using this header just for access to sleep() API. - the 2nd error is triggerred by the first error. Fix 'intptr_t' error, the other will go away.
Arcin Bozkurt
Problem was resolved when the file include order was modified. Tizen SDK is not robust enough apparently. The application I was using was the GLES Cube sample app and when the files I required are added 'first', then the problem goes away. interesting...
Stefan
Where did you changed the include order ? And what is that order now ?