LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-21-2013, 07:40 AM   #16
Pap
Member
 
Registered: May 2011
Distribution: Salix 14.1 GNU/Linux, 64-bit
Posts: 70

Original Poster
Rep: Reputation: 29

Quote:
Originally Posted by turtleli View Post
Bjarne Stroustrup's C++ faq - How do I define an in-class constant? states
You can take the address of a static member if (and only if) it has an out-of-class definition
Now, things like that are the reason there is space for languages like python, although it is an interpreted language, thus much slower by nature; not to mention "compiler-providing" languages, like Haskell, FreePascal, golang, and many others.

Being a Fortran 90/95 programmer for many years, I never had such an issue, although I extensively used modules (think of it as Fortran's way to define classes - although it's not exactly the same and it's way more flexible than C++'s classes.)
Honestly, if the multimedia libraries I need to use had ports for a decent compiled language, I would just get rid of C++ once and for all...

Anyway, I finally decided to use the enum trick, as ntubski suggested. This is actually what it is suggested at the above link as well.

Last edited by Pap; 09-21-2013 at 07:41 AM.
 
Old 10-05-2013, 01:07 PM   #17
hdg89
LQ Newbie
 
Registered: Oct 2013
Posts: 2

Rep: Reputation: Disabled
I used following linking sequence....is it correct

gcc helo.c -lopencl -L/usr/local/lib/ -I$M2S_ROOT/runtime/include -static -Wall

it is giving me error: collect2: ld returned 1 exit status
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] compiling error in sl-current "undefined reference to symbol"? marbangens Slackware 2 04-07-2013 09:51 AM
"undefined reference" error when trying to use GTL in a simple C++ application m4h Programming 6 03-29-2012 12:45 PM
Error when "make" the source of CosmoMC: undefined reference to `dpotrf_' limh Linux - Software 1 09-30-2009 02:27 PM
Error: Make on kismet-2005-08-R1 "undefined reference" zeevolking Linux - Software 1 12-23-2005 08:40 PM
G++ Linking Error "undefined reference" djjumper9 Programming 2 04-13-2004 09:36 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration