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

__attribute__ Not Recognized

<< < (3/4) > >>

stahta01:
Please learn to use code tags!
Next time try attaching the CB Project (it may need zipped)

Please try to build a wxWidgets hello world type CB project on Linux before doing a 390 MB size project!

Tim S.

stahta01:
Attached Zipped CB Project

stahta01:

--- Code: ---class WXDLLIMPEXP_CORE wxComboBoxDataFile : public WXDLLIMPEXP_CORE wxComboBox
--- End code ---

Why do you think the second WXDLLIMPEXP_CORE in your file Utilities.h is needed?

Edit2/3: The first WXDLLIMPEXP_CORE may or may not be needed; the second WXDLLIMPEXP_CORE I have great doubt is needed or is correct to have.

Edit1: Build log snippet added below.

--- Code: ---include/Utilities.h:256:52: note: in expansion of macro ‘WXDLLIMPEXP_CORE’
 class WXDLLIMPEXP_CORE wxComboBoxDataFile : public WXDLLIMPEXP_CORE wxComboBox
--- End code ---

Tim S.

spflanze:
Thank you for this answer. The WXDLLIMPEXP_CORE macro after the public keyword is the error's cause. Once removed this and all similar derived class declarations the compile was successful.

The original expectation was the parent class would have to appear in the line that creates the derived class in the same way the parent class was declared. In Windows 7 doing so did not trigger an error and compiled.

BlueHazzard:

--- Quote from: spflanze on February 17, 2019, 11:41:39 pm --- In Windows 7 doing so did not trigger an error and compiled.

--- End quote ---
probably because the macro expands to an empty macro on windows.
Always read the whole error message and all the "notes" that come with it. Do NOT think that the line where the error is flagged is the line where the error is. Most of the time it is in the last note line of the error message.

[EDIT:] This could have been solved after the first post, if you post the full rebuild log in the first message the next time ;), or at least after someone pointed to it

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version