Qt3 / Vs2003 - breakpoints etc, not working - qt

I've inherited a Qt3/Vs2003 project. Which I think's been badly mangled over the years, e.g. there was a new DEBUG macro added to it that was logging to file... opening the solution in VS and checking the build configurations I found there was no debug config (which I've added by copying the release config?) but it's not stopping at breakpoints (although it was at one point, now no longer playing - note: I do appear to be generating PDBs).
So how well should this integrate?
Should breakpoints, code completion etc work or am I expecting too much?
The only integration I've seen is the opening of a UI with Qt designer when I click on the ui in VS.
more...
it's in CVS, does QT have to be checked out with LF line endings?, this is mangling my VDProj?
Shouldn't the compiler output be put in the Release (or Debug) folder, mine's getting dumped in the same folder as the solution.

I added a debug build config, then added a path to the debug symbols and working directory, tried it again and it worked. All the project options appear to be more or less unset (hence the drop location for the exe etc.)

Related

Preview Failed - Visual Studio will look for typescript files when publishing even when they are not included

I'd like to do the inverse of this question/answer:
How to include TypeScript files when publishing?
The thing is that I'm trying to publish an ASP.NET MVC 5 Project. Unfortunately the dreaded Visual Studio and the hungry Jack Typescript interpreter ignores any tsconfig.json file and decides to go deep down and look for any .ts file that is not accompanied by a .js. I have lots of npm packages nested down and some of them have uncompiled typescript files.
Funny thing is, that they are not included in the project (not even an exclamation mark). (I even checked for the .csproj and no files were found).
Is this a bug? How can I prevent this from happening? Using VS 2015.2 (Update 2).
I had a very similar issue. Publish kept failing because it couldn't find foo.js as it wasn't in the same directory as my ts/tsconfig files, even though outDir was set to another location. I don't know if it is a bug or not but I couldn't figure it out using the tsconfig. Instead, I was able to get things working by using the inbuilt TypeScript Build settings instead.
First, I deleted all tsconfig files from my project (I made sure I kept a backup just in case). The TypeScript Build was originally greyed out because I had the tsconfig files in my project.
Next, I created a new folder directly under Scripts to save the js files into.
I then went to Project Properties and selected the TypeScript Build tab. Under Output, I checked the Redirect JavaScript output to directory and browsed to the newly created folder. I repeated this for all build configurations.
Finally, I included the new folder in my project and then built. Folders and files which aren't included in the project can be seen as a ghost icon in the Solution Explorer if you have Show All Files icon selected. I think that if you have multiple TypeScript projects with their own tsconfigs, the file structures are replicated under the chosen output directory but I haven't tested it in many cases so I'm not certain.
Obviously I had to redirect my script bundles to the newly created js structure.
When I first followed this process, I got a few build errors mainly due to my own daft mistakes in my TypeScript code which I'd set the tsconfig to conveniently ignore. Another error was multiple references for objects, which I managed to fix by deleting the definitions files and making sure that the Generate declaration files option was unchecked in Typescript Build. Once I fixed those issues though, I was able to publish without that annoying error - happy days!

Getting an all-white screen on deploying Qt Quick demo app Minehunt

To test the deployment process I am trying to deploy the included demo app Minehunt. I am able to get it to run, no crashing or errors, but the screen is all white.
I believe this generally means that I am missing plugins. Dependency walker reports no problems, and I even tried including ALL the plugins from the Qt MingW plugins directory, but no such luck.
Here is what I am including so far; Can anyone advise what else I need to add to get it to run?
Your dlls don't look bad at all. I think, too, that it's your plugins. Even if they are there, there is a good chance, that your program don't find them. Qt is a bit picky where to look by default. You might try qt.conf. This is a small textfile you must create in the folder where your executable lies. It contains the path to your Qt plugins.
For instance, in one of my projects I have the followin folder layout:
Appfolder
plugin
qt
plugins
imageformats
sqldrivers
myapp.exe
qt.conf
...many dlls...
Then I added a qt.conf file to the Appfolder, which has the following content:
[Paths]
Plugins = plugins/qt/plugins
My program is Qt 4, but I don't think this aspect of plugin deployment changed in Qt5.
All my qt dlls are in qt. And I add the following PATH: SET PATH=.\plugins;.\plugins\qt;%PATH%. Works like a charm on any Windows I ever tried.
Edit:
I then created a .bat file, which does:
SET PATH=.\plugins;.\plugins\qt;%PATH%
cd Appfolder
start myapp
This was an ugly quick fix, which I did not have the time to replace with something better, yet.
If application runs and shows blank screen then that usually indicates two things :
All the dependencies (dlls) are probably present and detected properly.
Most probably whats missing is the presence of qml files at the correct location.
In your main.cpp check the path of qml file which you would have given, and see if relatively that folder is present at the same location corresponding to your executable.
Also, instead of running the executable by double clicking, run it through the command line. It might print some messages if it is not able to locate some images/files/other dependencies etc according to the specified paths.
Edit 1 :
Add this flag in the .pro file :
CONFIG += console
It will give the exact debug message in a console once you run the application.

QWebview examples: only runs in specific directory

I'm trying to create a Qt app with a webview. I started out with a very simple UI with nothing more than a QWebview. When trying ui->webview->SetUrl("http://google.com"); the application crashes on something with openssl.
Auto configuration failed
3348:error:0200107B:system library:fopen:Unknown error:.\crypto\bio\bss_file.c:169:fopen('c:cygwinhomeAdministrateurbuildslavefull-windows_xp_32buildgpac_extra_libs/c:cygwinhomeAdministrateurbuildslavefull-windows_xp_32buildgpac_extra_libs/ssl/openssl.cnf','rb')
3348:error:2006D002:BIO routines:BIO_new_file:system lib:.\crypto\bio\bss_file.c:174:
3348:error:0E078002:configuration file routines:DEF_LOAD:system lib:.\crypto\conf\conf_def.c:199:
I continues trying the examples. Domtraversal is one of the easier applications so i tried to build and run this. It works.
Changed the url to "https://gmail.com" which also works (so no ssl issues there).
When i run the debug or release .exe it works normally (qt's bin path is in my path var so there are no dll problems), but when i move the executable to say, my Desktop it does not run.
I've tried several different things:
when i have any tree with the same amount of folders up to "build-domtraversal-Desktop_Qt_5_0_2_MSVC2010_32bit-Debug" as the folder it is build in continues by release with the executable in it (so: c:/test/test/test/test/test/test/build-domtraversal-Desktop_Qt_5_0_2_MSVC2010_32bit-Debug/release/app.exe) it works
When i add folders inside the release folder (...-Debug/release/test/test/app.exe) it works
When i change the name of either "build-domtraversal-Desktop_Qt_5_0_2_MSVC2010_32bit-*" or release folders it does not work (exept for the end of the build folder name)
When i change the name of the app itself it works.
When i change the folder structure to D:/* it does not work
When i turn off shadow build it does not work anymore in debug mode either. Unless i move the output .exe back into a folder structure where it did work.
There must be a path somewhere in the .pro.user or somewhere else i haven't thought about. Can anyone point me in the right direction? Cause right now I'm starting to believe in magic...

Injected code in *.ASPX.VB file at pre-build event is not compiled, have to compile twice, why?

I have a pre-build event in a web project in Visual Studio (2012 but same behaviour in 2010).
The prebuild invoke a simple exe which look for every filename.aspx.vb file if there is a matching filename.html in the folder.
If it does, it just read the filename.html as a string (escaped and minified) and inject it as a string also in the finename.aspx.vb something like :
myStribBuilder.Append("This is where the html code from the external file is going")
Let say i made a modification on filename.html I save and I compile and test the website. It should reflect the latest change when calling filename.aspx
Here what happens :
If I have a very light project with one page or two, it does work. It compiles fine as expected.
Then project get bigger and it doesn't work anymore. I mean code is injected but not compiled as expected, if I refresh filename.aspx on webserver I will still have same version but if I open filename.aspx.vb on VS the code is in there. Second compilation works 100% ok.
I can live with that but I have to compile TWICE each time for testing purpose after html files changes.
This doesn't make sense to me.
What "pre-build" means if in fact it seems to cache the code right on compilation request before executing the prebuild routine.
So, how can I be sure to inject code in my *.vb file before compilation begins ?
I figured out the problem was not VS not waiting for exe to complete on prebuild, but rather having the filename.aspx.vb opened when compiling.
The code update itself on the IDE (with options set to autoupdate externally modified opened page) but I guess the compile process keep the pre-build version of the opened file, which make sense in a way.
If I close the file before compiling it is ok.
Now I wonder if there is a workaround to this, but I understand it is not common practice to externally modify on the fly opened files in IDE before compilation. I do however rely heavily on this technique.

Xcode: overwrite compilation parameters of a .c/.cpp file

I'm very familiar with MS's Visual Studio environment, and recently I had to do some stuff for iPhone. I have a c++ project and I have performance critical components included as part of the project. This performance critical file absolutely must be compiled using optimized settings even for debug builds. That is, I have to overwrite settings for a file and pass -O2 -DNDEBUG when compiling one of the files of the project without affecting default compilation settings of the rest of the project.
Can this be done, I spent like an hour browsing through menus of XCode and wasn't able to find it!
If you go to your project window and select the file, you can get info on it with command-i or right clicking. Then go to the build tab, where you can enter additional compilation flags for this particular file.
I am on xcode 3.x but I don't imagine that they would remove this.
I note that this is just for additional compiler flags. If you need to remove some of your default flags the only option I can think of is a bit of a pain: make a new target that is set up with build options just for this file and include that target in your main target.

Resources