Author Topic: Cannot create output directory  (Read 44293 times)

Offline smallB

  • Almost regular
  • **
  • Posts: 193
Cannot create output directory
« on: October 25, 2011, 12:59:42 pm »
I've tried create precompiled header but I'm getting error:
"Cannot create object output directory" - I'm logged in as an administrator, I run codeblocks as an administrator, I have plenty of space on my drive yet there seems to be no solution for this. What's the problem and how to solve it?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Cannot create output directory
« Reply #1 on: October 25, 2011, 01:00:55 pm »
Hm, what is the full log? Does it work from the command line if you execute the same commands?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline smallB

  • Almost regular
  • **
  • Posts: 193
Re: Cannot create output directory
« Reply #2 on: October 25, 2011, 01:07:38 pm »
That's the full log and yes it does create precompiled header when run from command line:
Code
Build started on: 25-10-2011 at 12:05.29
 Build ended on: 25-10-2011 at 12:05.37

-------------- Build: Debug in e:\Excersizes\meta\Promote ---------------
 g++ -Wall -fexceptions -g -Wshadow -Winit-self -Wredundant-decls -Wcast-align -Wundef -Wfloat-equal -Winline -Wunreachable-code -Wmissing-declarations -Wmissing-include-dirs -Wswitch-enum -Wswitch-default -Weffc++ -Wmain -pedantic-errors -pedantic -std=c++0x -Wfatal-errors -Wextra -Wall -g -ID:\Libraries\boost_1_47_0\boost_1_47_0 -IE:\Excersizes\meta -Ie:\Excersizes\meta -c E:\Excersizes\meta\Promote.h -o E:\Excersizes\meta\Promote.h.gch
 g++ -Wall -fexceptions -g -Wshadow -Winit-self -Wredundant-decls -Wcast-align -Wundef -Wfloat-equal -Winline -Wunreachable-code -Wmissing-declarations -Wmissing-include-dirs -Wswitch-enum -Wswitch-default -Weffc++ -Wmain -pedantic-errors -pedantic -std=c++0x -Wfatal-errors -Wextra -Wall -g -ID:\Libraries\boost_1_47_0\boost_1_47_0 -Ie:\Excersizes\meta -Ie:\Excersizes\meta -c e:\Excersizes\meta\main.cpp -o obj\Debug\main.o
 mingw32-g++.exe -LC:\boost_1_47_0 -o \\bin\Debug\e\Excersizes\meta\Promote.exe obj\Debug\main.o
c:/mingw32/bin/../lib/gcc/mingw32/4.6.1/../../../../mingw32/bin/ld.exe: cannot open output file \\bin\Debug\e\Excersizes\meta\Promote.exe: No such file or directory
 collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 8 seconds)
1 errors, 0 warnings (0 minutes, 8 seconds)
« Last Edit: October 25, 2011, 01:30:18 pm by smallB »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Cannot create output directory
« Reply #3 on: October 25, 2011, 01:55:15 pm »
Your output path does not look valid.
A double backslash normally points to a server on windows.

You should check the output filename in the "Build targets"-tab of your projects properties.

Offline smallB

  • Almost regular
  • **
  • Posts: 193
Re: Cannot create output directory
« Reply #4 on: October 25, 2011, 02:02:29 pm »
I've created this precompiled file using code::blocks svn 7500 - the 7452 reported the aforementioned errors. But now with this precompiled header in place I'm getting error:
.\Promote.h.gch|1|error: stray '\216' in program|. What 'tha' heck?

Offline smallB

  • Almost regular
  • **
  • Posts: 193
Re: Cannot create output directory
« Reply #5 on: October 25, 2011, 02:17:06 pm »
Guys, that's the unfortunate header file which either doesn't want to get precompiled (with cb 7452) or gets precompiled (with cb 7500) but gives error. Can someone try to precompile it and see if it works for you? Thanks
Code
#ifndef PROMOTE_H_INCLUDED
#define PROMOTE_H_INCLUDED
#include <type_traits>
#include <boost/mpl/vector.hpp>
#include <boost/mpl/find.hpp>
#include <boost/mpl/next.hpp>
#include <boost/mpl/deref.hpp>
template<class Int_T,class Int_Y>
struct are_same_size
{
    enum {value = sizeof(Int_T) == sizeof(Int_Y)};
};
template<class Int_T>
struct Is_Char
{
    enum {value = false};
};
template<>
struct Is_Char<char>
{
    enum {value = true};
};
template<>
struct Is_Char<unsigned char>
{
    enum {value = true};
};

template<>
struct Is_Char<signed char>
{
    enum {value = true};
};
template<class Integral>
struct Promote
{
    static_assert(std::is_integral<Integral>::value,"Non integral type is not allowed.");
    typedef typename std::conditional<std::is_signed<Integral>::value,
                                boost::mpl::vector<char,short,int,typename std::conditional<!are_same_size<int,long>::value,long,long long>::type>,
    boost::mpl::vector<unsigned char,unsigned short,unsigned int,typename std::conditional<!are_same_size<unsigned int,unsigned long>::value,long,long long>::type>>::type types;

    typedef typename boost::mpl::find<types,
    typename std::conditional<Is_Char<Integral>::value,
    typename std::conditional<std::is_signed<Integral>::value,char,unsigned char>::type, Integral>::type>::type this_type;
typedef typename boost:: mpl::next<this_type>::type next_type;
    typedef typename boost::mpl::deref<next_type>::type type;

};

#endif // PROMOTE_H_INCLUDED

Offline smallB

  • Almost regular
  • **
  • Posts: 193
Re: Cannot create output directory
« Reply #6 on: October 25, 2011, 02:39:16 pm »
That is my output path - obj\Debug\Checking_if_operator_plus_works.exe (copied directly from cb) so everything looks ok, yet cannot make it working.

Offline smallB

  • Almost regular
  • **
  • Posts: 193
Re: Cannot create output directory
« Reply #7 on: October 25, 2011, 02:48:28 pm »
This is a link to full log. If you download it you'll see that at the very bottom of this log there is a msg saying that there are 28 errors. Yet NO ERROR IS LISTED ANYWHERE. What is going on?http://www.4shared.com/document/wNF2DXGk/Checking_if_operator_plus_work.html

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Cannot create output directory
« Reply #8 on: October 25, 2011, 02:57:00 pm »
Cannot open the log.
Please use pastebin style site.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Cannot create output directory
« Reply #9 on: October 25, 2011, 03:00:25 pm »
The posted error-message:
That's the full log and yes it does create precompiled header when run from command line:
Code
Build started on: 25-10-2011 at 12:05.29
 Build ended on: 25-10-2011 at 12:05.37

-------------- Build: Debug in e:\Excersizes\meta\Promote ---------------
 g++ -Wall -fexceptions -g -Wshadow -Winit-self -Wredundant-decls -Wcast-align -Wundef -Wfloat-equal -Winline -Wunreachable-code -Wmissing-declarations -Wmissing-include-dirs -Wswitch-enum -Wswitch-default -Weffc++ -Wmain -pedantic-errors -pedantic -std=c++0x -Wfatal-errors -Wextra -Wall -g -ID:\Libraries\boost_1_47_0\boost_1_47_0 -IE:\Excersizes\meta -Ie:\Excersizes\meta -c E:\Excersizes\meta\Promote.h -o E:\Excersizes\meta\Promote.h.gch
 g++ -Wall -fexceptions -g -Wshadow -Winit-self -Wredundant-decls -Wcast-align -Wundef -Wfloat-equal -Winline -Wunreachable-code -Wmissing-declarations -Wmissing-include-dirs -Wswitch-enum -Wswitch-default -Weffc++ -Wmain -pedantic-errors -pedantic -std=c++0x -Wfatal-errors -Wextra -Wall -g -ID:\Libraries\boost_1_47_0\boost_1_47_0 -Ie:\Excersizes\meta -Ie:\Excersizes\meta -c e:\Excersizes\meta\main.cpp -o obj\Debug\main.o
 mingw32-g++.exe -LC:\boost_1_47_0 -o \\bin\Debug\e\Excersizes\meta\Promote.exe obj\Debug\main.o
c:/mingw32/bin/../lib/gcc/mingw32/4.6.1/../../../../mingw32/bin/ld.exe: cannot open output file \\bin\Debug\e\Excersizes\meta\Promote.exe: No such file or directory
 collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 8 seconds)
1 errors, 0 warnings (0 minutes, 8 seconds)
has nothing to do with the output-path you give here:
That is my output path - obj\Debug\Checking_if_operator_plus_works.exe (copied directly from cb) so everything looks ok, yet cannot make it working.
the exe-names are different.

Your filesharing-site does not work on my linux-system (maybe I'm to restricted), so I can not look into your log.
Maybe you told C::B to ignore some compiler output ("Settings -> Compiler and debugger -> Other settings -> Compiler output to be ignored:")

As far as I could see, the precompiled header did not lead to an error-message, but:

C::B does not precompile, gcc/g++ does this.
Try a rebuild (with clean) the whole project.

Offline smallB

  • Almost regular
  • **
  • Posts: 193
Re: Cannot create output directory
« Reply #10 on: October 25, 2011, 03:02:17 pm »
Cannot open the log.
Please use pastebin style site.

Sorry for that, when I've posted this file it did work, now it doesn't even though I did nothing since my uploading. Anyway, check thishttp://pastebin.com/YFzXk6h5

Offline smallB

  • Almost regular
  • **
  • Posts: 193
Re: Cannot create output directory
« Reply #11 on: October 25, 2011, 03:06:35 pm »
@Jens the output path:bin\Debug\Promote.exe.
The previous path was indeed from a different project (I tried to precompile the Promote.h in a completely new project to use it in the other project (Checking_if_operator_plus_works.cbp)).
Anyway, there are no double backslashes anywhere to be seen.
Yes, I am aware that cb doesn't precompile anything ;)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Cannot create output directory
« Reply #12 on: October 25, 2011, 03:18:00 pm »
Does it build without pre-compilation? Does it build from the command line?
Have you tried to build simpler project with pre-compiled headers?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Cannot create output directory
« Reply #13 on: October 25, 2011, 06:55:04 pm »
As far as I see, it builds correctly, but the amount of errors makes me wonder.
There is no error as far as I know, but tons of warning.
Can you provide the html-file of the build-log ?

You can send it to me via PM.

If it really shows errors, instead of warning, we might have to fix the regexes, that parse the output.

Offline smallB

  • Almost regular
  • **
  • Posts: 193
Re: Cannot create output directory
« Reply #14 on: October 25, 2011, 07:25:04 pm »
@jens I don't know how to attach a file in here. Do you mind explaining? Thanks.