[CoinUtils-tickets] [COIN-OR Common Utilities] #49: mixed slash and backslash in CoinFileIO
COIN-OR Common Utilities
coin-trac at coin-or.org
Tue Apr 1 05:05:25 EDT 2008
#49: mixed slash and backslash in CoinFileIO
-------------------+--------------------------------------------------------
Reporter: stefan | Type: defect
Status: new | Priority: minor
Version: | Keywords:
-------------------+--------------------------------------------------------
Hi,
I got a failing Cgl unit test when Cgl is build under Windows with
Cygwin, MS Visual C++ 2003, and compile_f2c.
The problem seem to be that it does not find p0033.mps in the
Data/Samples directory.
I searched a bit around where the file opening actually take place, and
found CoinFileIO.cpp:640.
There, the string fileName which is given to fopen contains
{{{
.\../../Data/Sample/p0033.mps
}}}
This probably causes the problem.
fopen sets errno=2 which means "No such file or directory".
Someone has an idea why the filename has slash and backslash mixed?
The strange thing is that even when I change mpsDir in Cgl's unitTest to
{{{mpsDir = "..\\..\\Data\\Sample\\p0033.mps"}}}
the test is failing. Now it tries to open
{{{.\..\..\Data\Sample\p0033.mps}}}
and still cannot find it.
The only way I got it working was by calling unitTest in the form
{{{
./unitTest.exe 'echo c:/cygwin/home/svigerske/BuildDir-cl/Data/Sample/'
}}}
(where ' is replaced by `)
This happens for my Windows builds under Cygwin with cl 13.10 or Intel
10 compilers.
Best,
Stefan
--
Ticket URL: <https://projects.coin-or.org/CoinUtils/ticket/49>
COIN-OR Common Utilities <http://projects.coin-or.org/CoinUtils>
Common data structures and linear algebra functions for COIN-OR projects
More information about the CoinUtils-tickets
mailing list