Sysprogs forums › Forums › VisualGDB › Some problems with makefile
- This topic has 7 replies, 4 voices, and was last updated 11 years, 1 month ago by support.
-
AuthorPosts
-
November 17, 2013 at 10:57 #684AnonymousParticipant
Hi!
I’m using trial version of your tool VisualGDB, and i was trying to create some QTbased application for linux (RaspberryPi) using cross compiler.
I configured everything using tutorial, and i had problems with “make.exe”. I was receiving error:
“Syntax is incorrect”
After few hours (and manual execution of make with -d switch) i found that following code was source of my problems:$(TARGET): Debug/ui_MainWindow.h $(OBJECTS) @$(CHK_DIR_EXISTS) Debug/ || $(MKDIR) Debug/
$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)There was batch file created with following content:
@echo off test -d Debug/ || mkdir Debug/
I removed second line from makefile, and everything seems to work fine! Do I have something wrong in my system configuration or there is some bug?
I’m using Visual Studio 2010 Professional, and GDB 4.1r7.November 17, 2013 at 20:37 #2780ketParticipantHi,
That line should normally not give any issues.
Do you have any other toolchains on the PATH that include test or mkdir? Which part of “test -d Debug/ || mkdir Debug/ ” gives problems, is it “test -d Debug/” or “mkdir Debug/”? What is the output of each of them and the entire line together when executed from cmd?
November 17, 2013 at 21:18 #2781AnonymousParticipantOkay. After short investigation i can see, that the problem is with backslash after “Debug” in mkdir command – probably for test as well, but there is no visible message.
When i removed backslash, “test Debug” returned 0, and “mkdir Debug” message “Directory already exists”. With backslash: “test Debug/” returned 1, and “mkdir Debug/” “Syntax is incorrect”my path from “make” perspective looks like (exported from batch script which was invoked instead of make):
“C:Program Files (x86)NVIDIA CorporationPhysXCommon;C:WinAVR-20100110bin;C:WinAVR-20100110utilsbin;C:Program FilesCommon FilesMicrosoft SharedWindows Live;C:Program Files (x86)Common FilesMicrosoft SharedWindows Live;C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:WindowsSystem32WindowsPowerShellv1.0;C:Program FilesTortoiseSVNbin;C:Program Files (x86)Windows LiveShared;c:Program FilesJavajdk1.7.0_21\bin;C:Program Files (x86)QuickTimeQTSystem;C:SysGCCRaspberrybin;C:SysGCCraspberrybin “November 18, 2013 at 06:36 #2782supportKeymasterHi,
When we tested it on our side the problem never happened because the Debug directory was created by qmake, so the ‘mkdir’ command was never executed.
Have you changed any files that could result in a change of this behavior? Does doing a full rebuild solve the problem?November 18, 2013 at 10:30 #2783jorgosParticipantDebug directory exists, and as you said, was created by qmake. “test” tool is returning “1”, when slash is at the end of path, and correctly returns “0”, when there is no slash.
Problem appears when building and rebuilding as well.
As a workaround I created small script which removes this line from makefile, and invoke make.November 19, 2013 at 03:58 #2784supportKeymasterAre you using some third-party ‘test’ binary. The one included in our Beaglebone toolchain returns 0 when used with slash at the end. You can test it using the following code:
mkdir xxx test -d xxx || echo ERROR1 test -d xxx/ || echo ERROR2 test -d yyy || echo ERROR3
November 19, 2013 at 18:21 #2785jorgosParticipantThanks. You are completly right. I renamed any other “test.exe” binary on path, and now everything seems to work fine!
By the way, have you ever debug application with Phonon? I would like to create application that is playing audio files using Phonon class:
Phonon::MediaObject *mediaObject; mediaObject = Phonon::createPlayer(Phonon::MusicCategory);
And application is working correctly (sound is playing) when i run it manually from xterminal, but when i try to run it directly from Visual, GDB hungs on bolded line. I tried to run application manually and connect to them, but it’s not working as well. Could you give me any advice how to setup GDB to work with this?
November 21, 2013 at 02:09 #2786supportKeymasterHi,
Unfortunately we have not tested our tool with Phonon. If it does not work for you, you can either try starting it manually from the console and then attaching to it (select ‘attach’ in VisualGDB Project Properties) or look into the Phonon source to understand what API it is using to interact with the hardware and why it is not working over SSH. You can try selecting ‘Show X11 windows on the remote computer’ in VisualGDB Project Properties to see if it solves the problem.
-
AuthorPosts
- You must be logged in to reply to this topic.