10-23-2011 10:09 AM - edited 10-23-2011 10:15 AM
I'm currently working on a C++ project, creating a sort of Application framework similar to the BBUtils.c and .h files that sets up the screen contexts and initializes EGL, etc... , but does so in a class. While writing the code the IDE had no issues finding the functions that I was using from the various headers in the NDK. But once I tried to build the project so I could deploy it to the device, I started gettting " Undefined reference to 'function_name_here' " errors. The errors are showing for every EGL function that I am calling as well as the screen_ functions I am using. I am including the egl.h as well as screen.h where I should be. If I highlight one of the functions in question and press F3 ( Open Declaration ) it opens the header file and finds the function.
When I created the project I chose C++ as my Language and "Empty Application Project" as my Project Type in the New Project dialog.
If I start a new C language project there are no issues, so I am thinking that maybe there is a bug in the project creation of a C++ language project?
EDIT: Another thing I wanted to add was that none of the structs that are in the screen.h or egl.h that I am using in my class, for example: screen_context_t, are causing any compiler errors. Only the functions.
Any help would be greatly appreciated.
10-23-2011 10:46 AM
10-23-2011 11:53 AM
Just the new project. I was looking through the settings and noticed the Compiler/Linker settings were gone, so I used one of my other projects to get the right values and replace them.
I don't have an answer as to why this happened. If I create a new project the settings are all there.