Why Not Use "Cl.exe Link.exe" as the primary compiler?

Ask your support questions in here

Moderator: Moderator Team

hbelusca
Developer
Posts: 1197
Joined: Sat Dec 26, 2009 10:36 pm
Location: Zagreb, Croatia

Re: Why Not Use "Cl.exe Link.exe" as the primary compiler?

Post by hbelusca »

Good :) Amine and me are trying to fix them.
erkinalp
Posts: 860
Joined: Sat Dec 20, 2008 5:55 pm
Location: Izmir, TR

Re: Why Not Use "Cl.exe Link.exe" as the primary compiler?

Post by erkinalp »

Z98 wrote:Regarding C11, its improvements are for the most part irrelevant to us. To support its newer, higher level functionality, your operating system has to provide a certain level of infrastructure. Since we're writing the OS, that infrastructure isn't there. As such, we wouldn't be able to use the new stuff anyway.
I have found just three features we can use even in OS development:
-in between declarations
-no implicit int assumption in functions
-alignof(useful in chunk calculation)
-uses Ubuntu+GNOME 3 GNU/Linux
-likes Free (as in freedom) and Open Source Detergents
-favors open source of Windows 10 under GPL2
hbelusca
Developer
Posts: 1197
Joined: Sat Dec 26, 2009 10:36 pm
Location: Zagreb, Croatia

Re: Why Not Use "Cl.exe Link.exe" as the primary compiler?

Post by hbelusca »

@ BlackRabbit - compilation of shell32 and browseui should be fixed as of revision 58871. The cause was that, for c++ projects, we included "default C libraries" like shell32.lib, kernel32.lib.... included with the compiler, i.e. with Visual Studio, and thus declaration of symbols entered into collision when we linked with those libraries and with our own.

EDIT: and another compilation problem fixed in revision 58872 too.
EDIT2: Now a full bootcd can be made with Visual Studio.
BlackRabbit
Posts: 128
Joined: Sat Dec 22, 2012 7:36 am

Re: Why Not Use "Cl.exe Link.exe" as the primary compiler?

Post by BlackRabbit »

It is working better now. I did configure VSSolution to regenerate the solution and project files, then did an ALL_BUILD.

I should noted that, after doing and ALL_BUILD, I had to explicitly select and build the livecd project to build livecd.iso, which, for anyone interested, will be at:

C:\Users\BlackRabbit\Desktop\reactos\output-VS10-i386\reactos\livecd.iso

But after using VirtualBox to execute the newly-generated livecd.iso, livecd.iso shows the following error immediately upon booting:

[ external image ]

... apparently from:

C:\Users\BlackRabbit\Desktop\reactos\reactos\boot\freeldr\freeldr\bootmgr.c

Pressing any key results in an immediate reboot, where cycle repeats.
hbelusca
Developer
Posts: 1197
Joined: Sat Dec 26, 2009 10:36 pm
Location: Zagreb, Croatia

Re: Why Not Use "Cl.exe Link.exe" as the primary compiler?

Post by hbelusca »

Hi !
BlackRabbit wrote:It is working better now. I did configure VSSolution to regenerate the solution and project files, then did an ALL_BUILD.

I should noted that, after doing and ALL_BUILD, I had to explicitly select and build the livecd project to build livecd.iso
Notice that you can actually directly right-click on the "livecd" project and select "generate" (as well as for "bootcd"), but it's just a short-hand.
Concerning the livecd which seems to refuse to boot, I will have a look. I personally tested the bootcd which worked well (beware that, as with MSVC builds, you don't have a explorer.exe compiled).
BlackRabbit
Posts: 128
Joined: Sat Dec 22, 2012 7:36 am

Re: Why Not Use "Cl.exe Link.exe" as the primary compiler?

Post by BlackRabbit »

I realized just this morning that, all this time, I might have been trying to fix a that does not exist.
BlackRabbit wrote:It is true that mousing over NtSetSystemPowerState, for example, will show the function prototype in a pop-up. But being able to browse-around by doing Go To Declaration does not seem to work.
hbelusca wrote:- I can correctly find the definition of the NtSetSystemPowerState function : it is in ntpoapi.h (see the screen-shot).
Let me ask the following question again:
Second clarification: I went to the ntoskrnl project, opened shutdown.c, right-clicked on NtSetSystemPowerState, and selected Go To Declaration:
I am interested in knowing if you found NtSetSystemPowerState by right-clicking and selecting Go To Declaration. The problem is that it does not work for me, so that there are two explanations:
  1. My Visual Studio configuration is broken, in which case, I need to continue to find out what is wrong with it.
  2. You are finding NtSetSystemPowerState by some other method than the way that I identified above.
hbelusca
Developer
Posts: 1197
Joined: Sat Dec 26, 2009 10:36 pm
Location: Zagreb, Croatia

Re: Why Not Use "Cl.exe Link.exe" as the primary compiler?

Post by hbelusca »

BlackRabbit wrote: Let me ask the following question again:
Second clarification: I went to the ntoskrnl project, opened shutdown.c, right-clicked on NtSetSystemPowerState, and selected Go To Declaration:
I am interested in knowing if you found NtSetSystemPowerState by right-clicking and selecting Go To Declaration. The problem is that it does not work for me, so that there are two explanations:
  1. My Visual Studio configuration is broken, in which case, I need to continue to find out what is wrong with it.
  2. You are finding NtSetSystemPowerState by some other method than the way that I identified above.

Yep. Right-clicking on NtSetSystemPowerState in the shutdown.c code, then selecting "Go to declaration". Then the header file opens by itself and I land on the declaration of the function.
Maybe you need to rebuild the IntelliSense database ? (Remove the database file, open the solution and wait for VS to finish to parse all the files...)
BlackRabbit
Posts: 128
Joined: Sat Dec 22, 2012 7:36 am

Re: Why Not Use "Cl.exe Link.exe" as the primary compiler?

Post by BlackRabbit »

You suggestion worked. It was the Intellisense database. Deleting it and letting Visual Studio rebuild it fixed the problem.

There is a slight lag for some symbols, roughly 5-15 seconds on 3.0 GHz i5 with 8GB RAM running Virtual Box, but it is definitely usable.
Post Reply

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot], DotBot [Crawler] and 2 guests