multiple definition of ‘variable’

I received this error:

Filename.cpp:54: multiple definition of `variable’
Filename.o: Filename.cpp:24: first defined here
Filename.o: In function `function()’:

I thought it was something with multiple includes. But it turned out that I should have used .c files instead of .cpp.

When I renamed all the files the error was gone.

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: