~dcow90/myro-c++/extern-c

  • Committer: David Cowden
  • Date: 2011-07-01 20:34:54 UTC
  • Revision ID: cowdenda@grinnell.edu-20110701203454-aty853oonkl2b5f2
Fixed the getBright prototype so it doesn't default to a null string.
This is to address an error when compiling using extern C functions.  The g++ compilier isses an error regarding the call to the overloaded functions getBright being ambiguous.  I believe this is because the CPP Scribbler.h header lists the prototypes as follows:
std::vector<int> getBright();
and
int getBright(std::string value = ); 
Since this compiles strictly in CPP it must be an issue with the extern C compatibility.  When using extern C, the function signatures must break down both into:
std::vector<int> getBright(NULL);
and
int getBright(NULL);
These would be the same to the g++ compilier since the return type is not part of the signature.  This would cause the g++ compilier to produce the error regarding an ambiguous function getBright.  

To fix this, I changed the prototype in the Scribbler.h header to read:
int getBright(std::string value);
Filename Latest Rev Last Changed Committer Comment Size
..
cmake 7 13 years ago John Hoare Added the beginnings of a CMake managed install Diff
docs 1 13 years ago John Hoare Initial Software version from Lab Computers Diff
examples 1 13 years ago John Hoare Initial Software version from Lab Computers Diff
headers 1 13 years ago John Hoare Initial Software version from Lab Computers Diff
jpeg 81.1.3 13 years ago John Hoare Got library working with CImg in Windows (via CYGW Diff
lib 1 13 years ago John Hoare Initial Software version from Lab Computers Diff
src 1 13 years ago John Hoare Initial Software version from Lab Computers Diff
test 1 13 years ago John Hoare Initial Software version from Lab Computers Diff
CHANGELOG.txt 83 12 years ago John Hoare Updated changelog. 1.7 KB Diff Download File
CMakeLists.txt 81.1.3 13 years ago John Hoare Got library working with CImg in Windows (via CYGW 3.5 KB Diff Download File
LICENSE.txt 17 13 years ago John Hoare Added a LICENSE and README file. Added CPack into 34.3 KB Diff Download File
README.txt 81.1.7 13 years ago john at johnami Updated README files 893 bytes Diff Download File