cannot find -lcocos2dx

I am not able to even run a single project from the given sample in cocos2d-x.
Even when I try to create my on project I found the following error [cannot find ~~lcocos2dx].
below is the whole log I got in bada IDE. Check it from the end

* Build of configuration Simulator-Debug for project atharabc*
cs-make pre-build main-build
cd … & &
…config.txt
…icf
…png
…png
…png
…png
6 File copied
‘’
‘Building target: atharabc.exe’
‘Invoking: bada C++ Linker’
’ldflags:~~L“C:/InstalledSoftwares/badaInstalled/1.0.0/Model/Wave_LP1/Simulator” ~~L“C:/InstalledSoftwares/badaInstalled/1.0.0/Lib”~~L“C:/Users/athar/Downloads/cocos2d-x/atharabc/bada/sdk1.0/lib” sharedo“atharabc.exe” ./src/atharabcEntry.o ./Classes/AppDelegate.o ./Classes/HelloWorldScene.o ’
i686-mingw32-g++ ldflagsldobjs …/…/…/…/Box2D/proj.bada/sdk1.0/.Simulator-Debug/libBox2D.a …/…/…/…/chipmunk/proj.bada/sdk1.0/.Simulator-Debug/libchipmunk.a losp_rt0lcocos2dx lCocosDenshionllibc-newlib lFOsplFGraphicsOpengl lFGraphicsEgl
c:/installedsoftwares/badainstalled/1.0.0/tools/toolchains/win32/bin/…/lib/gcc/i686-mingw32/4.4.1/…/…/…/…/i686-mingw32/bin/ld.exe: cannot find
lcocos2dx
collect2: ld returned 1 exit status
cs-make: * [atharabc.exe] Error 1

Was your cocos2dx project compiled successfully? Check whether the libcocos2dx.so exists in ‘cocos2d-x\cocos2dx\proj.bada\sdk1.0imulator-Debug’ folder.
And Did you follow the step in http://www.cocos2d-x.org/projects/cocos2d-x/wiki/How_to_run_HelloWorld_and_tests_of_cocos2d-x_on_bada ?

Hey, guy, was your problem solved?:slight_smile:

Yes it resolved.
Actually I am new in this field. I made two mistake.
Firstly I copied the project in the work-space in which all other directories were absent :slight_smile: [due t which all relative paths were not working]
Secondly I was only building only few projects as given in the Hello World tutorial although here it requires to build all.

So eventually I was successful to run the HelloWorld and TestCocos2dx for simulator but when I try to build it as target release I get error. I do not what mistake I am doing this time. Can some one please help me. Below is the console log.

* Build of configuration Target-Release for project HelloWorld*

cs-make pre-build main-build
cd … & (if not exist lib mkdir lib) & (copy /y …2dx\proj.bada\sdk1.0arget-Release\libcocos2dx.so lib) & (copy /y …bada\sdk1.0arget-Release\libCocosDenshion.so lib) & (if not exist Res mkdir Res) & (xcopy /y /s …* Res)
The system cannot find the path specified.
The system cannot find the path specified.
…config.txt
…icf
…png
…png
…png
…png
6 File(s) copied
‘’
cs-make: * No rule to make target `…/…/…/…/Box2D/proj.bada/sdk1.0/.Target-Release/libBox2D.a’, needed by `HelloWorld.exe’. Stop.

Was Box2D project built successfully?Did you switch all project configure to ‘Target-Release’?

Hi,

switch all project configure to ‘Target-Release ->works :slight_smile:
After this I am facing problem that is related to device not related to cocos2d. Actually I have wave S8500 on which I have installed bada 2.0 non-official custom rom. It seems it lacks some OpenGL-ES libraries because just after showing splash on device here appears only red color :frowning:
Addition to this I have try this on wave S8530 with official bada1.2 OS. But problem with this is that

  1. I can not run as target release using sdk 1.0
  2. You can not run any application made in sdk 2.0 on devices having OS less then 2.0 like 1.0, 1.1 or 1.2.1 etc.
  3. I am unable to build it on sdk 1.1 and 1.2.1
    In file included from E:/BadaSetupsAndWorkspace/cocos2d-cocos2d-x-e67e099/Box2D/Common/b2Settings.cpp:21:
    c:.1.0\tools\toolchains\win32\bin/lib/gcc/i686-mingw32/4.4.1/…/…/…/…/include/c**/4.4.1/cstdio:118: error: ’::getchar’ has not been declared
    c:.1.0\tools\toolchains\win32\bin/lib/gcc/i686-mingw32/4.4.1/…/…/…/…/include/c**/4.4.1/cstdio:119: error:’::gets’ has not been declared
    c:.1.0\tools\toolchains\win32\bin/lib/gcc/i686-mingw32/4.4.1/…/…/…/…/include/c**/4.4.1/cstdio:120: error: ‘::perror’ has not been declared
    c:.1.0\tools\toolchains\win32\bin/lib/gcc/i686-mingw32/4.4.1/…/…/…/…/include/c**/4.4.1/cstdio:121: error: ‘::printf’ has not been declared
    c:.1.0\tools\toolchains\win32\bin/lib/gcc/i686-mingw32/4.4.1/…/…/…/…/include/c**/4.4.1/cstdio:123: error: ‘::putchar’ has not been declared
    c:.1.0\tools\toolchains\win32\bin/lib/gcc/i686-mingw32/4.4.1/…/…/…/…/include/c**/4.4.1/cstdio:128: error: ‘::scanf’ has not been declared
    c:.1.0\tools\toolchains\win32\bin/lib/gcc/i686-mingw32/4.4.1/…/…/…/…/include/c**/4.4.1/cstdio:131: error: ‘::sprintf’ has not been declared
    c:.1.0\tools\toolchains\win32\bin/lib/gcc/i686-mingw32/4.4.1/…/…/…/…/include/c**/4.4.1/cstdio:132: error: ‘::sscanf’ has not been declared
    c:.1.0\tools\toolchains\win32\bin/lib/gcc/i686-mingw32/4.4.1/…/…/…/…/include/c**/4.4.1/cstdio:133: error: ‘::tmpfile’ has not been declared
    c:.1.0\tools\toolchains\win32\bin/lib/gcc/i686-mingw32/4.4.1/…/…/…/…/include/c**/4.4.1/cstdio:134: error: ‘::tmpnam’ has not been declared
    c:.1.0\tools\toolchains\win32\bin/lib/gcc/i686-mingw32/4.4.1/…/…/…/…/include/c**/4.4.1/cstdio:137: error: ‘::vprintf’ has not been declared
    c:.1.0\tools\toolchains\win32\bin/lib/gcc/i686-mingw32/4.4.1/…/…/…/…/include/c**/4.4.1/cstdio:138: error: ‘::vsprintf’ has not been declared
    cs-make: **** Error 1
    **What you say about the devices other than Bada OS 1.0 and 2.0?*__
  1. I can not run as target release using sdk 1.0
    Using sdk2.0.3 if your s8500 had been updated to 2.0, and import cocos2d-x bada 2.0 projects by badaIDE2.0 to have a try.
  2. You can not run any application made in sdk 2.0 on devices having OS less then 2.0 like 1.0, 1.1 or 1.2.1 etc.
    You are right, as I know sdk2.0 can’t build the ‘.exe’ files for running on the devices those os less then 2.0, In my opinion, you should install each sdk separately.
  3. I am unable to build it on sdk 1.1 and 1.2.1
    The solution refers to http://cocos2d-x.org/boards/15/topics/5623.

Thanks you redmine@cocos2d-x.org _ With your help I am able to run test projects first time on my device :slight_smile:

  1. I am unable to build it on sdk 1.1 and 1.2.1
    The solution refers to http://cocos2d-x.org/boards/15/topics/5623. — > changing cstdio to stdio works for me. One strange thing is that it compiles only if I choose Build configuration as “Target-Release”. On choosing “Simulator-Debug” I got following error

* Build of configuration Simulator-Debug for project athartestproject1*

cs-make pre-build main-build
cd … & (if not exist Res mkdir Res) & (xcopy /y /s …* Res)
…config.txt
…icf
…png
…png
…png
…png
6 File(s) copied
‘’
‘Building target: athartestproject1.exe’
‘Invoking: bada C++ Linker’
’ldflags: ~~L“C:/BadaInstallations/1.2.1/Model/Wave_LP1/Simulator”~~L“C:/BadaInstallations/1.2.1/Lib” ~~L“E:/BadaSetupsAndWorkspace/cocos2d-cocos2d-x-a3d82e5/athartestproject1/bada/sdk1.0/lib”~~shared o“athartestproject1.exe” ./src/athartestproject1Entry.o ./Classes/AppDelegate.o ./Classes/HelloWorldScene.o ’
i686-mingw32-g++ ldflagsldobjs …/…/…/…/Box2D/proj.bada/sdk1.0/.Simulator-Debug/libBox2D.a …/…/…/…/chipmunk/proj.bada/sdk1.0/.Simulator-Debug/libchipmunk.a
losp_rt0 lcocos2dxlCocosDenshion llibc-newliblFOsp lFGraphicsOpengllFGraphicsEgl
c:/badainstallations/1.2.1/tools/toolchains/win32/bin/…/lib/gcc/i686-mingw32/4.4.1/…/…/…/…/i686-mingw32/bin/ld.exe: cannot find -lcocos2dx
collect2: ld returned 1 exit status
cs-make:***** Error 1

for Simulator-Debug I copy library files
cocos2dx\proj.bada\sdk1.0imulator-Debug\cocos2dx.dll
and
CocosDenshion\proj.bada\sdk1.0imulator-Debug\CocosDenshion.dll
in
*disc:.2.1\Model\Wave_LP1\Simulator
this solves the problem with the “cannot find-lcocos2dx”

Great … Now working all (device + simulator)
:slight_smile:

I m getting error …target-debug/libbox2d.a’, needed by ballonride.exe due to i have not copy this project in cocos2d directory so it is no able to find path given in .target-debug/objects