User forums > General (but related to Code::Blocks)

__attribute__ Not Recognized

<< < (2/4) > >>

BlueHazzard:
beside this being the wrong place to ask this kind of question i do not think that the compiler does not understand the __attribute__ bit, but the bit before the __attribute__ part.... There is some class as return value that is not defined or declared...


--- Quote ---This project is migrated from Windows 7 because I need Valgrind. This project was transferred from Windows 7 to Ubuntu. I suspect that is trouble. I have created a new project in Ubuntu, and transferred all the files into the new project. But this did not solve the compilation problem I opened this thread for.
--- End quote ---
Of course you can not use the same project.... there are tons of defines in the windows project file that are not supported or wrong on linux.
If you have a compiling problem follow this faq:
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F

spflanze:
I started this thread in this forum because I did not know whether this was a Code::Blocks problem or a wxWidgets problem.

The idea of wxWidgets is to be cross platform. A migration from Windows 7 to Ubuntu is supposed to be easy to do.

There are more things I have noticed. The error happens in the second define statement in this snippet from dlimpexp.h:


--- Code: ---#if defined(HAVE_VISIBILITY)
#    define WXEXPORT __attribute__ ((visibility("default")))
#    define WXIMPORT __attribute__ ((visibility("default")))
#elif defined(__WINDOWS__)
--- End code ---

Note that the first define line is nearly identical to the second. Only the name of the macro is different. When, as a test, I changed the name from WXIMPORT to WXIMPORTX the error on that line disappeared (there were many other errors elsewhere of course). There is something going on with the name WXIMPORT. Anyone know what?

stahta01:
If you think it is not a user error problem; post a full build log in code tags!

Note: I have no idea why you think it is a CB Problem; please state why you think so.

Edit: Do you realize you gave reasons for thinking it is a Compiler issue and reasons for thinking it is an wxWidgets issue.
But, no reason for thinking it is a CB issue!

Tim S.

sodev:
wxWidgets is cross platform, the compiler settings to make that magic happen however are not. These two macros do look quite different on the windows side because dll works different than so.

Without the build log, especially the full compiler line, this is just pure crystal ball we can do.

spflanze:
The Build Log and Build messages are attached. The entire project can be downloaded from: http://www.mediafire.com/file/hi6bs180ihy0p8f/TIA_Designer_2019-02-16.zip/file

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version